﻿Namespace Lookups
    Public Class Actions

#Region "Constructors"
        Private Sub New()
            'Seal the class
        End Sub
#End Region

#Region "Shared Methods"
        Public Shared Function GetActionDescription(ByVal action As ActionEnum) As String
            Return _actionsArray(action)
        End Function

        Public Shared Function GetActionEnumFromDescription(ByVal description As System.String) As ActionEnum
            Dim index As Int32 = Array.IndexOf(_actionsArray, description)
            If index = -1 Then
                Throw New ArgumentOutOfRangeException("description", System.String.Format("""{0}"" is not a valid action description.", description))
            End If

            Return DirectCast([Enum].Parse(GetType(ActionEnum), index), ActionEnum)
        End Function

        Public Shared Function GetActionsBindingSource() As IEnumerable(Of String)
            Dim returnable(_actionsArray.Length) As String
            Array.Copy(_actionsArray, returnable, _actionsArray.Length)
            Return returnable
        End Function
#End Region

#Region "Shared Member Fields"
        Private Shared _actionsArray As String() = { _
            "", _
            "Preview the TTS or music (with music id) without sending it", _
            "Get a list of your friends", _
            "Get a count and the list of the messages in your inbox", _
            "Get the timezone in which your Nabaztag is set", _
            "Get the signature defined for the Nabaztag", _
            "Get a count and the list of people in your blacklist", _
            "Get to know if the Nabaztag is sleeping (YES) or not (NO)", _
            "Get to know if the Nabaztag is a Nabaztag (V1) or a Nabaztag/tag (V2)", _
            "Get a list of all supported languages/voices for TTS (text to speach) engine", _
            "Get the name of the Nabaztag", _
            "Get the languages selected for the Nabaztag", _
            "Get a preview of a message", _
            "Send your Rabbit to sleep", _
            "Wake up your Rabbit" _
            }
#End Region

    End Class
End Namespace
